from django.urls import path

from apps.users.views import SMSCodesAPIView,RegisterUserAPIView,  UserDetailView
from apps.users.views import UpdatePwdView,UpdateLabelView

from apps.users.views import SMSCodesAPIView, RegisterUserAPIView, UserDetailView
from apps.users.views import UpdatePwdView,UpdateLabelView,UploadImageView

from rest_framework_jwt.views import obtain_jwt_token

urlpatterns = [

    # 发送短信
    path('sms_codes/<mobile>/', SMSCodesAPIView.as_view()),

    # 登录
    # path('authorizations/', LoginAPIView.as_view()),
    path('authorizations/', obtain_jwt_token),

    # 注册
    path('users/', RegisterUserAPIView.as_view()),

    # 个人中心
    path('user/', UserDetailView.as_view()),

    # 修改密码
    path('user/password/', UpdatePwdView.as_view()),

    # 修改标签
    path('user/label/', UpdateLabelView.as_view()),

    # 上传头像
    path('upload/avatar/', UploadImageView.as_view()),


]